/*package homework03;

import java.util.Scanner;
import java.util.Arrays;
class Rectangle{
	private int width;
	private int length;

	public Rectangle(int width,int length){
		this.width=width;;
		this.length=length;
	}
	
	public int getPerimeter(){
		return (this.width+this.length)*2;
	}
	
	public int getArea(){
		return this.width*this.length;
	}

	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	
	
}

class Circle{
	private int radius;	
	
	public Circle(int radius){
		this.radius=radius;
	}
	
	public int getPerimeter(){
		return (int) (2*Math.PI*this.radius);
	}
	
	public int getArea(){
		return (int)(Math.PI*this.radius*this.radius);
	}

	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	
}

public class Seven03 {
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		Rectangle recs[]=new Rectangle[2];
		for(int i=0;i<2;i++)
		{
			recs[i]=new Rectangle(sc.nextInt(),sc.nextInt());
		}
		Circle cirs[]=new Circle[2];
		for(int i=0;i<2;i++)
		{
			cirs[i]=new Circle(sc.nextInt());
		}
		System.out.println(recs[0].getPerimeter()+recs[1].getPerimeter()+cirs[0].getPerimeter()+cirs[1].getPerimeter());
		System.out.println(recs[0].getArea()+recs[1].getArea()+cirs[0].getArea()+cirs[1].getArea());
		System.out.println(Arrays.deepToString(recs));
		System.out.println(Arrays.deepToString(cirs));
		
		sc.close();
	}
}*/
